In the case where a rotation angle or a rotating speed of a motor is desired to be accurately controlled to be a predetermined value, an encoder is used.
The encoder includes a scale that is mounted to a rotating shaft and an encoder sensor for counting how many slits, which are regularly provided on the scale, pass through due to a rotation of the rotating shaft.
The encoder sensor includes a light emitting element emitting light against the slits in a vertical direction and a light receiving element provided opposite to the light emitting element across the slits so as to be able to detect the light passing through the slits. Here, it is necessary that the encoder sensor should be fixed to a predetermined position with respect to the scale mounted to the rotating shaft.
Conventionally, in order for the encoder sensor to be fixed to a predetermined position and wiring of the electrode terminal of the motor and the encoder sensor to able to be carried out at the same time, the encoder sensor has been attached on a substrate provided on an end surface of the motor.
More specifically, in a motor with an encoder as shown in Patent Literature 1 and FIGS. 14A and 14B, there is formed a through-hole in a substrate C for passing through the electrode terminal in an extending direction of the rotating shaft 14 in the end surface of the motor 1, and the electrode terminal and the wires implemented in the substrate C are fixed by soldering S in a state of the substrate C being attached on the end surface.
However, in this fixing method of the substrate and the encoder sensor, there occur a plurality of problems as described below.
1. In recent years, becoming lead-free in products such as motors has been demanded in consideration of the environment, and products which can do with little soldering and the like are also demanded, but these demands are not met in the present circumstances.
2. In the case where an encoder is mounted to a motor, the assembly results in a complicated cubic shape as shown in FIGS. 14A and 14B, and therefore it becomes a time-consuming task to fix the substrate and encoder sensor to the electrode terminal by soldering.
3. If the positions of the substrate and the encoder sensor are fixed by soldering, in the case where the encoder is removed, the solder should be melted, and once the encoder is mounted, it is very difficult to remove the same. That is, the encoder can not be easily mounted and detached to and from the motor.